<?php 

namespace app\common\validate\table;

use think\Validate;

class CommonTableNamespace extends Validate 
{ 
    protected $rule = [
        'remark' => 'require',
        'admin_controller_namespace' => 'require',
        'api_controller_namespace' => 'require',
        'business_namespace' => 'require',
        'model_namespace' => 'require',
        'validate_namespace' => 'require',
        'front_api_name' => 'require',
        'table_prefix' => 'require',
        'table_file_prefix' => 'require'
    ];

    protected $message = [
        'remark.require' => '请输入模块对应菜单名称',
        'admin_controller_namespace.require' => '请输入admin控制器包名',
        'api_controller_namespace.require' => '请输入api控制器包名',
        'business_namespace.require' => '请输入业务层包名',
        'model_namespace.require' => '请输入model层包名',
        'validate_namespace.require' => '请输入validate验证层包名',
        'front_api_name.require' => '请输入前端api模块文件名',
        'table_prefix.require' => '请输入表名前缀',
        'table_file_prefix.require' => '请输入生成文件忽略的前缀'
    ];

    protected $scene = [
        'edit' => ['remark','admin_controller_namespace','table_prefix','table_file_prefix','api_controller_namespace','business_namespace','front_api_name','model_namespace','validate_namespace','id'],
        'add' => ['remark','admin_controller_namespace','table_prefix','table_file_prefix','api_controller_namespace','business_namespace','front_api_name','model_namespace','validate_namespace'],
    ];

} 
